<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<s:form action="image!upload" theme="simple" enctype="multipart/form-data" method="POST">
	<table border="0" style="padding:10px;width:100%">
		<tr>
			<td width="100px"><s:label value="地址" /></td>
			<td><s:file name="data" /></td>
			
		</tr>
		<tr>
			<td colspan="2"><s:submit label="提交"></s:submit></td>

		</tr>
	</table>
</s:form>

<s:if test="image.data!=''">
<s:form action="image!save" theme="simple">
	<table border="1">
		<tr>
			<td width="100px"><s:label value="缩略图" /></td>
			<td><img src="<s:property value="image.src" />" /></td>
			<td width="100px"></td>
		</tr>
		<tr>
			<td width="100px"><s:label value="电影" /></td>
			<td>
			
			<s:iterator value="image.movies" status="stat">
				<li><s:a href="movie!edit?movie.id=%{id}"><s:property value="displayName" /></s:a></li>
			</s:iterator>
			+ 
			<s:iterator value="image.moviesForOne" status="stat">
				<li><s:a href="movie!edit?movie.id=%{id}"><s:property value="displayName" /></s:a></li>
			</s:iterator>(海报)
			</td>
			<td width="100px"></td>
		</tr>
		<tr>
			<td width="100px"><s:label value="人" /></td>
			<td>
			<s:iterator value="image.persons" status="stat">
				<li><s:a href="person!edit?person.id=%{id}"><s:property value="displayName" /></s:a></li>
			</s:iterator>
			+ 
			<s:iterator value="image.personsForOne" status="stat">
				<li><s:a href="person!edit?person.id=%{id}"><s:property value="displayName" /></s:a></li>
			</s:iterator>(头像)
			</td>
			<td width="100px"></td>
		</tr>
		<tr>
			<td width="100px"><s:label value="名称" /></td>
			<td><s:textfield name="image.name" /></td>
			<td width="100px"></td>
		</tr>
		<tr>
			<td width="100px"><s:label value="中文名" /></td>
			<td><s:textfield name="image.nameCn" /></td>
			<td width="100px"></td>
		</tr>


		<tr>
			<td colspan="3"><s:submit label="提交"></s:submit></td>

		</tr>
	</table>
</s:form>
</s:if>